import type { RouteRecordRaw } from 'vue-router';

const systemRoutes: RouteRecordRaw = {
  path: '/system',
  name: 'System',
  component: () => import('@/layouts/BasicLayout.vue'),
  meta: {
    title: 'menu.system.title',
    icon: 'SettingOutlined',
    orderNo: 2,
    requiresAuth: true,
  },
  children: [
    {
      path: 'user',
      name: 'SystemUser',
      component: () => import('@/views/system/user/index.vue'),
      meta: {
        title: 'menu.system.user',
        icon: 'UserOutlined',
        requiresAuth: true,
        permissions: ['system:user:list'],
      },
    },
    {
      path: 'role',
      name: 'SystemRole',
      component: () => import('@/views/system/role/index.vue'),
      meta: {
        title: 'menu.system.role',
        icon: 'TeamOutlined',
        requiresAuth: true,
        permissions: ['system:role:list'],
      },
    },
    {
      path: 'menu',
      name: 'SystemMenu',
      component: () => import('@/views/system/menu/index.vue'),
      meta: {
        title: 'menu.system.menu',
        icon: 'MenuOutlined',
        requiresAuth: true,
        permissions: ['system:menu:list'],
      },
    },
    {
      path: 'dept',
      name: 'SystemDept',
      component: () => import('@/views/system/dept/index.vue'),
      meta: {
        title: 'menu.system.dept',
        icon: 'ApartmentOutlined',
        requiresAuth: true,
        permissions: ['system:dept:list'],
      },
    },
    {
      path: 'user/profile',
      name: 'UserProfile',
      redirect: '/profile/settings',
      meta: {
        hideInMenu: true,
      },
    },
  ],
};

export default systemRoutes; 